package com.vst.orm.dao.hibernate.original;

import java.io.Serializable;
import java.util.List;
import org.hibernate.NonUniqueResultException;

import com.vst.orm.search.ExampleOptions;
import com.vst.orm.search.Filter;
import com.vst.orm.search.ISearch;
import com.vst.orm.search.SearchResult;

public abstract interface GenericDAO<T, ID extends Serializable> {
	public abstract void create(T paramT);

	public abstract boolean createOrUpdate(T paramT);

	public abstract boolean deleteById(ID paramID);

	public abstract boolean deleteEntity(T paramT);

	public abstract T fetch(ID paramID);

	public abstract List<T> fetchAll();

	public abstract void update(T paramT);

	public abstract List<T> search(ISearch paramISearch);

	public abstract int count(ISearch paramISearch);

	public abstract SearchResult<T> searchAndCount(ISearch paramISearch);

	public abstract List searchGeneric(ISearch paramISearch);

	public abstract Object searchUnique(ISearch paramISearch) throws NonUniqueResultException;

	public abstract boolean isConnected(Object paramObject);

	public abstract void flush();

	public abstract void refresh(Object paramObject);

	public abstract Filter getFilterFromExample(T paramT);

	public abstract Filter getFilterFromExample(T paramT, ExampleOptions paramExampleOptions);
}
